#ifndef __WIN_TYPE_H___
#define __WIN_TYPE_H___

#ifdef _WIN32
void usleep(int x);

typedef void* pthread_t;
typedef void* pthread_cond_t;
struct pthread_mutex_t;
typedef void* (*thread_proc) (void* context);

int pthread_create(pthread_t* pid, void* attr, thread_proc proc, void* object);
void pthread_join(pthread_t pid, void* attr);

void pthread_cond_init(pthread_cond_t* handle);
void pthread_cond_signal(pthread_cond_t* handle);
void pthread_cond_wait(pthread_cond_t* handle);
void pthread_cond_destroy(pthread_cond_t* handle);

void pthread_mutex_init(pthread_mutex_t** lock, void* x);
void pthread_mutex_lock(pthread_mutex_t*lock);
void pthread_mutex_unlock(pthread_mutex_t* lock);
void pthread_mutex_destroy(pthread_mutex_t* lock);
#endif

#endif //__WIN_TYPE_H___